package ml.kupin.common.utils;

import java.util.Calendar;
import java.util.Date;

/**
 * Created by 小柯(Allen Kerr) on 17.5.11 8:57.
 */
public class DateUtils {

    public static Date getTimeAgo(int seconds) {
        Calendar calendar = Calendar.getInstance();
        //减去传递过来的时间
        calendar.add(Calendar.SECOND, -seconds);
        Date date = calendar.getTime();
        return date;
    }

}
